package Data_Structure;

import java.util.Scanner;


public class test1 {
    public static void main(String[] args) {
        System.out.println("==================蟑螂银行===============");

        Scanner sca = new Scanner(System.in);

        System.out.println("请输入你的账户名：" );
        String a = sca.next();

        System.out.println("请输入你的账号：");
        int b = sca.nextInt();
        Customer cus = new Customer(a,b,0);
        System.out.println("===================================");

        System.out.println("欢迎用户"+a +"登录");
        while(true) {
            System.out.println("===================================");

            System.out.println("1.存款");
            System.out.println("2.取款");
            System.out.println("3.查询");
            System.out.println("4.退出");

            System.out.println("请输入序号： ");
            int s = sca.nextInt();





            switch (s) {
                case 1:
                    System.out.println("请输入你的存款数额：");
                    double d = sca.nextDouble();
                    cus.deposit(d);


                    break;
                case 2:
                    System.out.println("请输入你的取款金额：");
                    double w = sca.nextDouble();
                    cus.withdraw(w);


                    break;
                case 3:


                    cus.checkBalance();
                    System.out.println("您的余额为：" + cus.balance);
                    break;
                case 4:
                    break;
            }

            System.out.println("===================================");
        }



    }


}
